﻿namespace System.ServiceModel.DomainServices.Client
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.CompilerServices;

    public class EntityAction
    {
        private List<object> _parameters;

        public EntityAction(string name, params object[] parameters)
        {
            this.Name = name;
            this._parameters = new List<object>();
            if (parameters != null)
            {
                this._parameters.AddRange(parameters);
            }
        }

        public bool HasParameters
        {
            get
            {
                return (this._parameters.Count > 0);
            }
        }

        public string Name { get; private set; }

        public IEnumerable<object> Parameters
        {
            get
            {
                return this._parameters;
            }
        }
    }
}

